<template>
  <div class="reportFormPage">
    <!--    <topOperation/>-->
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>

      <div class="topTwoBox">
        <div class="centerName">土的击实试验检测记录表</div>
        <div class="codeText">
          <tr>
            JGLQ01007
          </tr>
        </div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>记录编号：</span>
          <span class="placeholder">{{ form.jilbh }}</span>
        </div>
      </div>
      <div class="table-border">
        <!-- .........................1111111111111111111111111111111......................................................... -->
        <table height="220px" class="top-table" align="center">
          <tbody>
            <tr>
              <td height="30" align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程名称</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程部位/用途</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="50" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>

                <span>；样品数量：</span>
                <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
                <span>；来样时间：</span>
                <span :class="{ placeholder: !form.yangpsj }">{{ form.yangpsj }}</span>
              </td>
            </tr>

            <tr>
              <td height="25" align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验检测日期</span>
              </td>
              <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->
              <td width="35%" class="text-center">
                <el-input v-model="form.shiyjcrq" />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验条件</span>
              </td>
              <td v-if="isPdf" width="35%">
                温度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjwd }}</span>
                ℃；湿度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjsd }}</span>%RH
              </td>
              <td v-else width="35%">
                温度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" class="height100"
                  style="width: 15%" />℃；湿度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" class="height100"
                  style="width: 15%" />%RH
              </td>
            </tr>

            <tr>
              <td height="50" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark"
                  @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView"
                  @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="50" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark"
                  @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="610px" class="middle-table">
          <tbody>
            <tr trindex="0">
              <td colspan="3" class="td3">击锤质量（kg）</td>
              <td colspan="1" class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.jiczl"
                  @keydown.native="handleKeyDown($event, 0, 0)" :ref="'0_0'" />
              </td>
              <td colspan="2" class="td2">每层击数</td>
              <td colspan="1" class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.meicjs"
                  @keydown.native="handleKeyDown($event, 0, 1)" :ref="'0_1'" />
              </td>
              <td colspan="2" class="td2">落距（cm）</td>
              <td colspan="1" class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.luoj"
                  @keydown.native="handleKeyDown($event, 0, 2)" :ref="'0_2'" />
              </td>
              <td colspan="3" class="td3">＞5mm颗粒含量（%）</td>
              <td colspan="1" class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.kelhl5"
                  @keydown.native="handleKeyDown($event, 0, 3)" :ref="'0_3'" />
              </td>
            </tr>
            <tr trindex="1">
              <td colspan="4" class="td4" rowspan="1">试验次数</td>
              <td colspan="2" class="td2" rowspan="1">1</td>
              <td colspan="2" class="td2" rowspan="1">2</td>
              <td colspan="2" class="td2" rowspan="1">3</td>
              <td colspan="2" class="td2" rowspan="1">4</td>
              <td colspan="2" class="td2" rowspan="1">5</td>
            </tr>
            <tr trindex="2">
              <td colspan="1" class="td1" rowspan="6">
                干
                <br />密 <br />度
              </td>
              <td colspan="3" class="td3" rowspan="1">筒容积（cm3）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].tongrj" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('0', 'tong')" readonly />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].tongrj" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('1', 'tong')" readonly />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].tongrj" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('2', 'tong')" readonly />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].tongrj" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('3', 'tong')" readonly />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].tongrj" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('4', 'tong')" readonly />
              </td>
            </tr>
            <tr trindex="3">
              <td colspan="3" class="td3" rowspan="1">筒质量（g）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].tongzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].tongzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].tongzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].tongzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].tongzl" disabled />
              </td>
            </tr>
            <tr trindex="4">
              <td colspan="3" class="td3" rowspan="1">筒＋湿土质量（g）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].tongjstzl"
                  @blur="calculateShitzl(0)" @keydown.native="handleKeyDown($event, 1, 0)" :ref="'1_0'"
                  @paste.native="handlePaste($event, 0, 0)" />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].tongjstzl"
                  @change="calculateShitzl(1)" @keydown.native="handleKeyDown($event, 1, 1)" :ref="'1_1'"
                  @paste.native="handlePaste($event, 0, 1)" />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].tongjstzl"
                  @change="calculateShitzl(2)" @keydown.native="handleKeyDown($event, 1, 2)" :ref="'1_2'"
                  @paste.native="handlePaste($event, 0, 2)" />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].tongjstzl"
                  @change="calculateShitzl(3)" @keydown.native="handleKeyDown($event, 1, 3)" :ref="'1_3'"
                  @paste.native="handlePaste($event, 0, 3)" />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].tongjstzl"
                  @change="calculateShitzl(4)" @keydown.native="handleKeyDown($event, 1, 4)" :ref="'1_4'"
                  @paste.native="handlePaste($event, 0, 4)" />
              </td>
            </tr>
            <tr trindex="5">
              <td colspan="3" class="td3" rowspan="1">湿土质量（g）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].shitzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].shitzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].shitzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].shitzl" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].shitzl" disabled />
              </td>
            </tr>
            <tr trindex="6">
              <td colspan="3" class="td3" rowspan="1">湿密度（g/cm3）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].shimd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].shimd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].shimd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].shimd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].shimd" disabled />
              </td>
            </tr>
            <tr trindex="7">
              <td colspan="3" class="td3" rowspan="1">干密度（g/cm3）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].ganmd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].ganmd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].ganmd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].ganmd" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].ganmd" disabled />
              </td>
            </tr>

            <!--        含水率-->
            <tr trindex="8">
              <td colspan="1" class="td1" rowspan="8">
                含
                <br />水 <br />率
              </td>
              <td colspan="3" class="td3" rowspan="1">盒号</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[0].heh1" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('0,1')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[0].heh2" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('0,2')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[1].heh1" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('1,1')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[1].heh2" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('1,2')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[2].heh1" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('2,1')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[2].heh2" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('2,2')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[3].heh1" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('3,1')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[3].heh2" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('3,2')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[4].heh1" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('4,1')" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input readonly v-model="form.baDetailVos[4].heh2" class="pointer mark"
                  @dblclick.native="showBaQjDetailView('4,2')" />
              </td>
            </tr>
            <tr trindex="9">
              <td colspan="3" class="td3" rowspan="1">盒质量（g）</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hezl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hezl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hezl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hezl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hezl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hezl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hezl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hezl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hezl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hezl2" disabled />
              </td>
            </tr>
            <tr trindex="10">
              <td colspan="3" class="td3" rowspan="1">盒＋湿土质量（g）</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hejstzl1"
                  @change="calculate(0, 1)" @keydown.native="handleKeyDown($event, 2, 0)" :ref="'2_0'"
                  @paste.native="handlePaste($event, 1, 0)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hejstzl2"
                  @change="calculate(0, 2)" @keydown.native="handleKeyDown($event, 2, 1)" :ref="'2_1'"
                  @paste.native="handlePaste($event, 1, 1)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hejstzl1"
                  @change="calculate(1, 1)" @keydown.native="handleKeyDown($event, 2, 2)" :ref="'2_2'"
                  @paste.native="handlePaste($event, 1, 2)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hejstzl2"
                  @change="calculate(1, 2)" @keydown.native="handleKeyDown($event, 2, 3)" :ref="'2_3'"
                  @paste.native="handlePaste($event, 1, 3)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hejstzl1"
                  @change="calculate(2, 1)" @keydown.native="handleKeyDown($event, 2, 4)" :ref="'2_4'"
                  @paste.native="handlePaste($event, 1, 4)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hejstzl2"
                  @change="calculate(2, 2)" @keydown.native="handleKeyDown($event, 2, 5)" :ref="'2_5'"
                  @paste.native="handlePaste($event, 1, 5)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hejstzl1"
                  @change="calculate(3, 1)" @keydown.native="handleKeyDown($event, 2, 6)" :ref="'2_6'"
                  @paste.native="handlePaste($event, 1, 6)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hejstzl2"
                  @change="calculate(3, 2)" @keydown.native="handleKeyDown($event, 2, 7)" :ref="'2_7'"
                  @paste.native="handlePaste($event, 1, 7)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hejstzl1"
                  @change="calculate(4, 1)" @keydown.native="handleKeyDown($event, 2, 8)" :ref="'2_8'"
                  @paste.native="handlePaste($event, 1, 8)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hejstzl2"
                  @change="calculate(4, 2)" @keydown.native="handleKeyDown($event, 2, 9)" :ref="'2_9'"
                  @paste.native="handlePaste($event, 1, 9)" />
              </td>
            </tr>
            <tr trindex="11">
              <td colspan="3" class="td3" rowspan="1">盒＋干土质量（g）</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hejgtzl1"
                  @change="calculate(0, 1)" @keydown.native="handleKeyDown($event, 3, 0)" :ref="'3_0'"
                  @paste.native="handlePaste($event, 2, 0)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hejgtzl2"
                  @change="calculate(0, 2)" @keydown.native="handleKeyDown($event, 3, 1)" :ref="'3_1'"
                  @paste.native="handlePaste($event, 2, 0)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hejgtzl1"
                  @change="calculate(1, 1)" @keydown.native="handleKeyDown($event, 3, 2)" :ref="'3_2'"
                  @paste.native="handlePaste($event, 2, 1)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hejgtzl2"
                  @change="calculate(1, 2)" @keydown.native="handleKeyDown($event, 3, 3)" :ref="'3_3'"
                  @paste.native="handlePaste($event, 2, 2)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hejgtzl1"
                  @change="calculate(2, 1)" @keydown.native="handleKeyDown($event, 3, 4)" :ref="'3_4'"
                  @paste.native="handlePaste($event, 2, 3)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hejgtzl2"
                  @change="calculate(2, 2)" @keydown.native="handleKeyDown($event, 3, 5)" :ref="'3_5'"
                  @paste.native="handlePaste($event, 2, 4)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hejgtzl1"
                  @change="calculate(3, 1)" @keydown.native="handleKeyDown($event, 3, 6)" :ref="'3_6'"
                  @paste.native="handlePaste($event, 2, 5)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hejgtzl2"
                  @change="calculate(3, 2)" @keydown.native="handleKeyDown($event, 3, 7)" :ref="'3_7'"
                  @paste.native="handlePaste($event, 2, 6)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hejgtzl1"
                  @change="calculate(4, 1)" @keydown.native="handleKeyDown($event, 3, 8)" :ref="'3_8'"
                  @paste.native="handlePaste($event, 2, 7)" />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hejgtzl2"
                  @change="calculate(4, 2)" @keydown.native="handleKeyDown($event, 3, 9)" :ref="'3_9'"
                  @paste.native="handlePaste($event, 2, 9)" />
              </td>
            </tr>
            <tr trindex="12">
              <td colspan="3" class="td3" rowspan="1">水质量（g）</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].shuifzl1"
                  @blur="calculate(0, 1)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].shuifzl2"
                  @blur="calculate(0, 2)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].shuifzl1"
                  @blur="calculate(1, 1)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].shuifzl2"
                  @blur="calculate(1, 2)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].shuifzl1"
                  @blur="calculate(2, 1)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].shuifzl2"
                  @blur="calculate(2, 2)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].shuifzl1"
                  @blur="calculate(3, 1)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].shuifzl2"
                  @blur="calculate(3, 2)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].shuifzl1"
                  @blur="calculate(4, 1)" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].shuifzl2"
                  @blur="calculate(4, 2)" disabled />
              </td>
            </tr>
            <tr trindex="13">
              <td colspan="3" class="td3" rowspan="1">干土质量（g）</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].gantzl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].gantzl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].gantzl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].gantzl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].gantzl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].gantzl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].gantzl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].gantzl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].gantzl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].gantzl2" disabled />
              </td>
            </tr>
            <tr trindex="14">
              <td colspan="3" class="td3" rowspan="1">含水率（%）</td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hansl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hansl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hansl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hansl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hansl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hansl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hansl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hansl2" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hansl1" disabled />
              </td>
              <td colspan="1" class="td1" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hansl2" disabled />
              </td>
            </tr>
            <tr trindex="15">
              <td colspan="3" class="td3" rowspan="1">平均含水率（%）</td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[0].hanslpjz" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[1].hanslpjz" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[2].hanslpjz" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[3].hanslpjz" disabled />
              </td>
              <td colspan="2" class="td2" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.baDetailVos[4].hanslpjz" disabled />
              </td>
            </tr>

            <tr trindex="16">
              <td colspan="4" class="td4" rowspan="1">最大干密度（g/cm3）</td>
              <td colspan="3" class="td3" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.zuidgmd" disabled />
              </td>
              <td colspan="4" class="td4" rowspan="1">最佳含水率 （%）</td>
              <td colspan="3" class="td3" rowspan="1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.zuijhsl" disabled />
              </td>
            </tr>

            <tr trindex="16">
              <td colspan="14" class="echarts-border">
                <!-- <table-line-log-more-chart :className="'echarts-border'" :chartData="chartData" :xMin="chartData.xMin"
                  :xMax="chartData.xMax" :yMin="chartData.yMin" :yMax="chartData.yMax" :isSmooth="true"
                  :minorSplitLine="true"></table-line-log-more-chart> -->

                <table-line-log-more-chart :className="'echarts-border'" :chartData="chartData" :xMin="chartData.xMin"
                  :xMax="chartData.xMax" :yMin="chartData.yMin" :yMax="chartData.yMax" :interval="interval"
                  :isSmooth="true" :minorSplitLine="true"></table-line-log-more-chart>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .....................................................33333333333333333................................................... -->
        <table height="60px" class="bottom-table">
          <tr>
            <td>
              <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.fujsm" @focus="handleFocus('fujsm')" />
            </td>
          </tr>
        </table>
      </div>
      <!-- .................................44444444444............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <ba-qj-detail-view ref="baQjDetailViewRef" :excelId="excelId" :shiyjcrq="form.shiyjcrq"
      @select="selectBaQjDetail"></ba-qj-detail-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType"></bs-judge-base-view>
  </div>
</template>

<script>
import { handleFocus, emptyConvert, handleKeyDown, handlePaste } from "@/views/reportForms/utils";
import { getTgTdjsjlbBsInfo, computeTgTdjsjlbBsInfo } from "@/api/report_tg/tgTdjsjlbBsInfo";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BaQjDetailView from "@/views/sycs/baQjDetail/BaQjDetailView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView.vue";
import TableLineLogMoreChart from "@/views/reportForms/components/TableLineLogMoreChart.vue";

import decimal from "@/utils/big-decimal";
import Bus from "@/utils/bus";
export default {
  name: "tdjsjlb",
  components: {
    BsInstrumentView,
    BaQjDetailView,
    BsJiancyjView,
    TableLineLogMoreChart,
    BsJudgeBaseView
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    syType: {
      type: [String, Number],
      default: () => ""
    },
    page: {
      type: Number,
      default: () => 0
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    printEmpty: {
      type: Boolean,
      default: () => false
    }
  },
  data () {
    return {
      // 表单参数
      form: {
        baDetailVos: [{}, {}, {}, {}, {}]
      },
      chartData: {
        xName: "含水率（%）",
        yName: "干密度（g/ cm3）",
        xData: [],
        yData: [],
        seriesData: [],
        time: "",
        xMin: 2,
        xMax: 14,
        yMin: 1.7,
        yMax: 2.2
      },
      interval: 1
    };
  },
  watch: {
    isPdf (newVal, oldVal) {
      this.form = { ...emptyConvert(this.form, newVal) };
    }
  },
  created () {
    // console.log("this.excelId: ", this.excelId);
    this.getInfo();
  },
  methods: {
    // 获取详情
    getInfo () {
      getTgTdjsjlbBsInfo(this.excelId || this.$defaultExcelId).then((response) => {
        this.form = response.data;
        if (!this.form.fujsm) {
          this.form.fujsm = "附加声明：";
        }
        this.calculateInfo();
      });
    },
    // 显示检测依据列表
    showBsJiancyjView () {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj (info) {
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
      Bus.$emit("setTgBgJiancyj", { jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds });
    },
    // 显示判定依据列表
    showBsJudgeBaseView () {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge (info) {
      this.form.pandyjIds = info.ids;
      this.form.pandyj = info.label;
    },
    // 显示仪器列表
    showBsInstrumentView () {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    // 仪器选择
    selectInstrument (info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
      Bus.$emit("setTgBgZhuyyqsbmcjbh", { zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds });
    },
    // 显示盒号列表
    showBaQjDetailView (type, label) {
      this.label = label;
      if (label != "tong") {
        this.collectHehId();
      }
      this.$refs.baQjDetailViewRef.init(type, this.form.hehIdList);
    },
    // 盒号选择
    selectBaQjDetail (type, obj) {
      if (this.label == "tong") {
        // 2024年10月12日  改为  五列同时变化，数值相同
        for (let i = 0; i < 5; i++) {
          this.form.baDetailVos[i]["tongrj"] = obj.tongrj;
          this.form.baDetailVos[i]["tongzl"] = obj.quality;
          this.calculateShitzl(i);
        }
        return;
      }
      if (type.length != 3) {
        return;
      }
      const arr = type.split(",");
      this.form.baDetailVos[arr[0]]["heh" + arr[1]] = obj.hh;
      this.form.baDetailVos[arr[0]]["heh" + arr[1] + "Id"] = obj.detailId;
      this.form.baDetailVos[arr[0]]["hezl" + arr[1]] = obj.quality;
      this.calculate(arr[0], arr[1]);
    },
    // 计算湿土质量
    calculateShitzl (type) {
      if (!this.form.baDetailVos[type].tongrj || !this.form.baDetailVos[type].tongzl || !this.form.baDetailVos[type].tongjstzl) {
        this.form.baDetailVos[type].shitzl = "";
        this.form.baDetailVos[type].shimd = "";
        this.calculateGanmd(type);
        return;
      }
      // 湿土质量(g) = 筒＋湿土质量（g） - 筒质量（g）
      this.form.baDetailVos[type].shitzl = decimal.subtract(this.form.baDetailVos[type].tongjstzl, this.form.baDetailVos[type].tongzl, 0);
      // 湿密度 = 湿土质量 / 筒容积
      this.form.baDetailVos[type].shimd = decimal.divide(this.form.baDetailVos[type].shitzl, this.form.baDetailVos[type].tongrj);
      this.calculateGanmd(type);
    },
    // 计算干密度
    calculateGanmd (type) {
      if (!this.form.baDetailVos[type].shimd || !this.form.baDetailVos[type].hanslpjz) {
        this.form.baDetailVos[type].ganmd = "";
        this.calculateInfo();
        return;
      }
      // 干密度 = 湿密度 / (1+平均含水率)
      this.form.baDetailVos[type].ganmd = decimal.divide(decimal.multiply(this.form.baDetailVos[type].shimd, 100), decimal.add(100, this.form.baDetailVos[type].hanslpjz));
      this.calculateInfo();
    },
    // 计算
    calculate (arrType, type) {
      if (!this.form.baDetailVos[arrType]["hejstzl" + type] || !this.form.baDetailVos[arrType]["hejgtzl" + type]) {
        this.form.baDetailVos[arrType]["shuifzl" + type] = "";
        this.form.baDetailVos[arrType]["gantzl" + type] = "";
        this.form.baDetailVos[arrType]["hansl" + type] = "";
        this.form.baDetailVos[type]["hanslpjz"] = "";
        this.calculateHanslpjz(arrType);
        return;
      }
      // 水分质量(g) = (盒+湿土质量(g)) -(盒+干土质量(g))
      this.form.baDetailVos[arrType]["shuifzl" + type] = decimal.subtract(this.form.baDetailVos[arrType]["hejstzl" + type], this.form.baDetailVos[arrType]["hejgtzl" + type]);
      if (!this.form.baDetailVos[arrType]["hezl" + type]) {
        this.form.baDetailVos[arrType]["gantzl" + type] = "";
        this.form.baDetailVos[arrType]["hansl" + type] = "";
        this.form.baDetailVos[type]["hanslpjz"] = "";
        this.calculateHanslpjz(arrType);
        return;
      }
      // 干土质量（g） = (盒+干土质量(g)) -(盒质量(g))
      this.form.baDetailVos[arrType]["gantzl" + type] = decimal.subtract(this.form.baDetailVos[arrType]["hejgtzl" + type], this.form.baDetailVos[arrType]["hezl" + type]);
      // 含水率(%) = (水分质量(g)) -(干土质量（g）) * 100%
      this.form.baDetailVos[arrType]["hansl" + type] = decimal.divide(decimal.multiply(this.form.baDetailVos[arrType]["shuifzl" + type], 100, 1), this.form.baDetailVos[arrType]["gantzl" + type], 1);
      this.calculateHanslpjz(arrType);
    },
    // 计算平均含水率
    calculateHanslpjz (type) {
      if (!this.form.baDetailVos[type]["hansl1"] || !this.form.baDetailVos[type]["hansl2"]) {
        this.form.baDetailVos[type]["hanslpjz"] = "";
        this.calculateGanmd(type);
        // this.calculateInfo();
        return;
      }
      // 含水率平均值(%) = (J+K)/2
      this.form.baDetailVos[type]["hanslpjz"] = decimal.divide(decimal.add(this.form.baDetailVos[type]["hansl1"], this.form.baDetailVos[type]["hansl2"], 1), 2, 1);
      this.calculateGanmd(type);
      // this.calculateInfo();
    },
    // 计算传值最大干密度
    calculateZuidgmd () {
      // 2024年10月14日 改为 任一一个击实表的结果有变化，都给index发消息，index接到消息后，汇总所有N张击实表的结果，计算平均值，再发给报告。 begin
      Bus.$emit("Tg89ResultChange");
      // 2024年10月14日 改为 任一一个击实表的结果有变化，都给index发消息，index接到消息后，汇总所有N张击实表的结果，计算平均值，再发给报告。end

      // Bus.$emit("cbrZuidgmdChange", { zuidgmd: this.form.zuidgmd, zuijhsl: this.form.zuijhsl });
    },
    // 传值试验数据
    setTjssyBgTestData () {
      const info = {
        page: this.page,
        data: this.form.baDetailVos
      };
      Bus.$emit("setTjssyBgTestData", info);
    },
    // 最佳含水率
    setTjssyBgzuijhs () {
      const info = {
        page: this.page,
        zuijhsl: this.form.zuijhsl,
        zuidgmd: this.form.zuidgmd,
        chartData: this.form.chartData
      };
      Bus.$emit("setTjssyBgzuijhs", info);
    },
    // 计算图表轨迹与最大干密度等
    calculateInfo () {
      this.setTjssyBgTestData();
      let flg = false;
      for (let index = 0; index < this.form.baDetailVos.length; index++) {
        const item = this.form.baDetailVos[index];
        if (!item.ganmd || !item.hanslpjz) {
          flg = true;
          break;
        }
      }
      if (flg) {
        this.chartData.seriesData = [];
        return;
      }
      computeTgTdjsjlbBsInfo(this.form).then((response) => {
        this.form = response.data;
        // MOD： 土的击实记录表 图 的尺寸改为自适应大小
        this.chartData.xMax = undefined;
        this.chartData.xMin = undefined;
        this.chartData.yMax = undefined;
        this.chartData.yMin = undefined;
        this.setEcharts();
        this.calculateZuidgmd();
        this.setTjssyBgzuijhs();
      });
    },
    // 拼接图表数据
    setEcharts () {
      if (!this.form.chartData || this.form.chartData.length <= 0) {
        this.chartData.seriesData = [];
        return;
      }
      let data1 = [];
      let data2 = [];
      let data3 = [];
      let xMin = 0;
      let xMax = 0;
      let yMin = 0;
      let yMax = 0;
      this.form.chartData.forEach((item, index) => {
        if (index == 0) {
          xMin = item.point[0];
          xMax = item.point[0];
          yMin = item.point[1];
          yMax = item.point[1];
        }
        if (item.point[0] < xMin) {
          xMin = item.point[0];
        }
        if (item.point[1] < yMin) {
          yMin = item.point[1];
        }
        if (item.point[0] > xMax) {
          xMax = item.point[0];
        }
        if (item.point[1] > yMax) {
          yMax = item.point[1];
        }
        switch (item.flag) {
          case "100":
            data1.push(item.point);
            break;
          case "010":
            data2.push(item.point);
            break;
          case "011":
            data3.push(item.point);
            break;
        }
      });
      xMin = xMin > this.interval ? decimal.subtract(xMin, this.interval, 0) : xMin;
      yMin = yMin > 0.2 ? decimal.subtract(yMin, 0.2, 1) : yMin;
      xMax = decimal.add(xMax, this.interval, 0);
      yMax = decimal.add(yMax, 0.2, 1);
      this.chartData.xMin = xMin;
      this.chartData.yMin = yMin;
      this.chartData.xMax = xMax;
      this.chartData.yMax = yMax;
      let markLineData = [];
      data3.forEach((item) => {
        markLineData.push([
          {
            coord: [2, item[1]]
          },
          {
            coord: [item[0], item[1]]
          }
        ]);
        markLineData.push([
          {
            coord: [item[0], 1.7]
          },
          {
            coord: [item[0], item[1]]
          }
        ]);
      });
      const chart1 = {
        data: data1,
        connectNulls: true,
        smooth: true,
        symbol: "none",
        type: "line",
        markLine: {
          symbolSize: [1],
          label: { show: false },
          silent: true,
          data: markLineData
        }
      };
      const labelData = data3.map((item) => {
        return {
          value: item,
          label: {
            show: true,
            formatter: JSON.stringify(item),
            position: "top"
          },
          itemStyle: {}
        };
      });
      const chart2 = {
        type: "scatter",
        symbolSize: 4,
        data: [...data2, ...labelData]
      };
      this.chartData.seriesData = [chart1, chart2];
    },
    // 汇总盒号id
    collectHehId () {
      const arr = ["0,1", "0,2", "1,1", "1,2", "2,1", "2,2", "3,1", "3,2"];
      let hehIdList = [];
      arr.forEach((item) => {
        const strArr = item.split(",");
        const hehId = this.form.baDetailVos[strArr[0]]["heh" + strArr[1] + "Id"];
        if (hehId) {
          hehIdList.push(hehId);
        }
      });
      this.form.hehIdList = hehIdList;
    },
    submitForm () {
      this.collectHehId();
      return this.form;
    },
    handleFocus (event) {
      handleFocus(event, this.page, this.form[event]);
    },
    handleKeyDown (event, rowIndex, colIndex) {
      const maxArr = [3, 4, 9, 9]; // 每一行最多有多少可聚焦输入框（从0开始）
      const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
      if (this.$refs[ref]) {
        this.$refs[ref].focus();
      }
    },
    handlePaste (event, rowIndex, colIndex) {
      const nameAllArr = [
        ["tongjstzl", "tongjstzl", "tongjstzl", "tongjstzl", "tongjstzl"],
        ["hejstzl1", "hejstzl2", "hejstzl1", "hejstzl2", "hejstzl1", "hejstzl2", "hejstzl1", "hejstzl2", "hejstzl1", "hejstzl2"],
        ["hejgtzl1", "hejgtzl2", "hejgtzl1", "hejgtzl2", "hejgtzl1", "hejgtzl2", "hejgtzl1", "hejgtzl2", "hejgtzl1", "hejgtzl2"]
      ];
      const methodsAllArr = [
        ["calculateShitzl", "calculateShitzl", "calculateShitzl", "calculateShitzl", "calculateShitzl"],
        ["calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate"],
        ["calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate"]
      ];
      // 写一个调用传参的list
      const parameterArr = [
        [0, 1, 2, 3, 4],
        [
          [0, 1],
          [0, 2],
          [1, 1],
          [1, 2],
          [2, 1],
          [2, 2],
          [3, 1],
          [3, 2],
          [4, 1],
          [4, 2]
        ],
        [
          [0, 1],
          [0, 2],
          [1, 1],
          [1, 2],
          [2, 1],
          [2, 2],
          [3, 1],
          [3, 2],
          [4, 1],
          [4, 2]
        ]
        // ["0,1", "0,2", "1,1", "1,2", "2,1", "2,2", "3,1", "3,2", "4,1", "4,2"]
      ];
      // 写一个下标的list
      const subscriptArr = [
        [0, 1, 2, 3, 4],
        [0, 0, 1, 1, 2, 2, 3, 3, 4, 4],
        [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]
      ];
      const data = handlePaste(event, rowIndex, colIndex, nameAllArr, methodsAllArr, parameterArr, subscriptArr);
      const { cols, nameSetArr, methodsSetArr, parameterSetArr, subscriptSetArr } = data;
      for (let a = 0; a < nameSetArr.length; a++) {
        for (let b = 0; b < nameSetArr[a].length; b++) {
          this.form.baDetailVos[subscriptSetArr[a][b]][nameSetArr[a][b]] = cols[a][b];
          // this.$set(this.form.baDetailVos, [subscriptSetArr[a][b]], cols[a][b]);
          // this.$forceUpdate();
        }
      }
      for (let a = 0; a < methodsSetArr.length; a++) {
        for (let b = 0; b < methodsSetArr[a].length; b++) {
          if (methodsSetArr[a][b] == "calculateShitzl") {
            this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b]);
          } else {
            this.setCalculate(methodsSetArr[a][b], parameterSetArr[a][b][0], parameterSetArr[a][b][1]);
          }
        }
      }
    },
    getLastTwoChars (str, num) {
      return str.slice(num);
    },
    // 计算方法调用
    setCalculate (name, a, b, c, d, e) {
      this[name](a, b, c, d, e);
    }
  }
};
</script>

<style scoped>
.td1 {
  width: calc(100% / 14 * 1);
}

.td2 {
  width: calc(100% / 14 * 2);
}

.td3 {
  width: calc(100% / 14 * 3);
}

.td4 {
  width: calc(100% / 14 * 4);
}

.td5 {
  width: calc(100% / 14 * 5);
}

.echarts-border {
  width: calc(210mm - 40mm - 8px);
  height: 176px;
  padding: 2px !important;
  background-color: #ffffff !important;
}
</style>
